Optimal. Leaf size=62 \[ -\frac {(d g+e f)^2 \log (d-e x)}{2 d e^3}+\frac {(e f-d g)^2 \log (d+e x)}{2 d e^3}-\frac {g^2 x}{e^2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.08, antiderivative size = 62, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 3, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.136, Rules used = {702, 633, 31} \[ -\frac {(d g+e f)^2 \log (d-e x)}{2 d e^3}+\frac {(e f-d g)^2 \log (d+e x)}{2 d e^3}-\frac {g^2 x}{e^2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 31
Rule 633
Rule 702
Rubi steps
\begin {align*} \int \frac {(f+g x)^2}{d^2-e^2 x^2} \, dx &=\int \left (-\frac {g^2}{e^2}+\frac {e^2 f^2+d^2 g^2+2 e^2 f g x}{e^2 \left (d^2-e^2 x^2\right )}\right ) \, dx\\ &=-\frac {g^2 x}{e^2}+\frac {\int \frac {e^2 f^2+d^2 g^2+2 e^2 f g x}{d^2-e^2 x^2} \, dx}{e^2}\\ &=-\frac {g^2 x}{e^2}-\frac {(e f-d g)^2 \int \frac {1}{-d e-e^2 x} \, dx}{2 d e}+\frac {(e f+d g)^2 \int \frac {1}{d e-e^2 x} \, dx}{2 d e}\\ &=-\frac {g^2 x}{e^2}-\frac {(e f+d g)^2 \log (d-e x)}{2 d e^3}+\frac {(e f-d g)^2 \log (d+e x)}{2 d e^3}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.02, size = 55, normalized size = 0.89 \[ \frac {\left (d^2 g^2+e^2 f^2\right ) \tanh ^{-1}\left (\frac {e x}{d}\right )-d e g \left (f \log \left (d^2-e^2 x^2\right )+g x\right )}{d e^3} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.91, size = 76, normalized size = 1.23 \[ -\frac {2 \, d e g^{2} x - {\left (e^{2} f^{2} - 2 \, d e f g + d^{2} g^{2}\right )} \log \left (e x + d\right ) + {\left (e^{2} f^{2} + 2 \, d e f g + d^{2} g^{2}\right )} \log \left (e x - d\right )}{2 \, d e^{3}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.15, size = 81, normalized size = 1.31 \[ -g^{2} x e^{\left (-2\right )} - f g e^{\left (-2\right )} \log \left ({\left | x^{2} e^{2} - d^{2} \right |}\right ) - \frac {{\left (d^{2} g^{2} + f^{2} e^{2}\right )} e^{\left (-3\right )} \log \left (\frac {{\left | 2 \, x e^{2} - 2 \, {\left | d \right |} e \right |}}{{\left | 2 \, x e^{2} + 2 \, {\left | d \right |} e \right |}}\right )}{2 \, {\left | d \right |}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.01, size = 107, normalized size = 1.73 \[ -\frac {d \,g^{2} \ln \left (e x -d \right )}{2 e^{3}}+\frac {d \,g^{2} \ln \left (e x +d \right )}{2 e^{3}}-\frac {f^{2} \ln \left (e x -d \right )}{2 d e}+\frac {f^{2} \ln \left (e x +d \right )}{2 d e}-\frac {f g \ln \left (e x -d \right )}{e^{2}}-\frac {f g \ln \left (e x +d \right )}{e^{2}}-\frac {g^{2} x}{e^{2}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.44, size = 82, normalized size = 1.32 \[ -\frac {g^{2} x}{e^{2}} + \frac {{\left (e^{2} f^{2} - 2 \, d e f g + d^{2} g^{2}\right )} \log \left (e x + d\right )}{2 \, d e^{3}} - \frac {{\left (e^{2} f^{2} + 2 \, d e f g + d^{2} g^{2}\right )} \log \left (e x - d\right )}{2 \, d e^{3}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.15, size = 81, normalized size = 1.31 \[ \frac {\ln \left (d+e\,x\right )\,\left (d^2\,g^2-2\,d\,e\,f\,g+e^2\,f^2\right )}{2\,d\,e^3}-\frac {g^2\,x}{e^2}-\frac {\ln \left (d-e\,x\right )\,\left (d^2\,g^2+2\,d\,e\,f\,g+e^2\,f^2\right )}{2\,d\,e^3} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [B] time = 0.64, size = 112, normalized size = 1.81 \[ - \frac {g^{2} x}{e^{2}} + \frac {\left (d g - e f\right )^{2} \log {\left (x + \frac {2 d^{2} f g + \frac {d \left (d g - e f\right )^{2}}{e}}{d^{2} g^{2} + e^{2} f^{2}} \right )}}{2 d e^{3}} - \frac {\left (d g + e f\right )^{2} \log {\left (x + \frac {2 d^{2} f g - \frac {d \left (d g + e f\right )^{2}}{e}}{d^{2} g^{2} + e^{2} f^{2}} \right )}}{2 d e^{3}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________